<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Very Buity</title>
  <link rel="stylesheet" th:href="@{/css/reset.css}">
  <script th:src="@{/js/vue.min.js}"></script>
  <script th:src="@{/js/axios.min.js}"></script>
  <style>
    body{
      background-image: url(/imgs/bgimg.jpg);
      background-size: cover;
      background-repeat: no-repeat;
    }
    .container{
      height: 300px;
      width: 450px;
      margin: 150px auto;
      background-color: rgba(0, 0, 0, .5);
      color: #fff;
      border-radius: 5px;
    }
    .container .title{
      width: 450px;
      height: 100px;
      font-size: 24px;
      font-weight: bold;
      text-align: center;
      line-height: 100px;
    }
    .container input{
      all:unset;
      display: block;
      width: 225px;
      height: 35px;
      margin: 0 auto;
      border-bottom: 1px solid #fff;
      text-indent: 6px;
      margin-bottom: 20px;
      background-color: transparent;
    }
    .container button{
      all:unset;
      text-align: center;
      font-size: 14px;
      display: block;
      height: 25px;
      width: 150px;
      margin: 25px auto;
      color: #fff;
      cursor: pointer;
      border-radius: 5px;
      background-image: linear-gradient(to right, #b8cbb8 0%, #b8cbb8 0%, #b465da 0%, #cf6cc9 33%, #ee609c 66%, #ee609c 100%);
    }

    .container input:focus{
      border: 1px solid;
      border-radius: 5px;
      border-color: pink;
    }
  </style>
</head>
<body>
<div class="container" id="app">
  <div class="title">LOGIN</div>
  <form action="#">
    <input type="text" class="username" v-model="username">
    <input type="password" class="pwd" v-model="password">
    <button @click="login">LOGIN</button>
  </form>
  <script>
    const app = new Vue({
      el: "#app",
      data() {
        return {
          username: '',
          password: ''
        }
      },
      methods: {
        login() {
          axios.post('/login',{userName: this.username,password: this.password})
            .then(response => {
              console.log(response)
            })
        }
      }
    });
  </script>
</div>
</body>
</html>
